const request = (url,method='GET',data)=>{
	let token = "Bearer" + ' ' + uni.getStorageSync('token')
	console.log(data);
	return new Promise( (resolve,reject)=>{
		uni.request({
			url:url,
			data:data,
			method:method,
			header:{
				'Authorization':token,
				
			},
			success(res) {
				resolve(res)
			},
			fail(err) {
				reject(err)
			}
		})
	})
}

export default request